﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace test1
{
    class Program
    {
        struct Numbers
        {
            public int val;
            public Numbers(int _val)
            {
                val = _val;
            }

            public override string ToString()
            {
                return val.ToString();
            }
        }

        class cNumbers
        {
            public int val;
            public cNumbers(int _val)
            {
                val = _val;
            }

            public override string ToString()
            {
                return val.ToString();
            }
        }        

        static void Main(string[] args)
        {
            Numbers n1 = new Numbers(0);
            Numbers n2 = n1;
            n1.val += 1;
            n2.val += 2;
            Console.WriteLine("n1 = {0}, n2= {1}", n1.val, n2.val);

            cNumbers c1 = new cNumbers(0);
            cNumbers c2 = c1;
            c1.val += 1;
            c2.val += 2;
            Console.WriteLine("c1 = {0}, c2= {1}", c1.val, c2.val);

            Console.WriteLine("Value type and reference type");
        }
    }
}
